[NFC] Rename ExtInfo::Uncommon to ExtInfo::ClangTypeInfo.#33117
Conversation
|
@swift-ci please smoke test |
include/swift/AST/Types.h
Outdated
There was a problem hiding this comment.
Hey @varungandhi-apple, looking at this I was wondering if maybe worth to ExtInfo to have an hasClangTypeInfo() API? Just a thought, maybe something like this could not be a relevant gain but could be an improvement over the getClangTypeInfo().hasValue() calls
There was a problem hiding this comment.
I deliberately avoided that. IMO it doesn't make sense to implement hasXYZ(), getXYZ() for every type and optional field; that's precisely what Optional is for, so you can just return an Optional and have the caller use that. If it was the case that a large number of callers want to check only for existence, I would've been fine with adding a convenience method, but that's not the case here.
3630010 to
5f18829
Compare
|
Force pushed because changing some comments above/below created merge conflicts. @swift-ci please smoke test |
|
Oh wait, some whitespace changes snuck in. 🤦 |
The previous name was poorly chosen (by me). Time to fix that.
5f18829 to
aeda622
Compare
|
@swift-ci please smoke test |
The previous name was poorly chosen (by me). Time to fix that.
I broke off this commit out of the ExtInfo builder-pattern refactoring (that one's pretty large, like 1k+, 1k-).